Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switched to pipnest package structure #5

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open

Switched to pipnest package structure #5

wants to merge 40 commits into from

Conversation

Helveg
Copy link
Contributor

@Helveg Helveg commented May 27, 2020

With this structure we should be able to package this module as a pip package using

python setup.py sdist
twine upload dist/* --skip-existing

And can be installed with

pip install cereb_nest

@alberto-antonietti
Copy link
Contributor

In this way, previous standar cmake installation will not work?

It is good to have cereb-nest pip-installable, but it should be retro-compatible (e.g., with the collabs that install cerebnest from source.

@Helveg
Copy link
Contributor Author

Helveg commented Jun 16, 2020

Standard CMake installation still works, maybe with some adaptations to the instructions with regards to the directory instructions like cd. I wanted to leave the source installation instructions there but it seems I removed them. I'll change this when I have time and finally test the importance of the nest_bin_vars.sh

@Helveg
Copy link
Contributor Author

Helveg commented Jun 16, 2020

In this way, previous standar cmake installation will not work?

It is good to have cereb-nest pip-installable, but it should be retro-compatible (e.g., with the collabs that install cerebnest from source.

Aaaaah no I see what you mean, you should always freeze your dependencies in notebooks and other "deployments":

  • Install specific versions
  • Clone specific commits

Otherwise when any of your dependencies change your notebook breaks. Is there anything that you know of for SGA2 review that depends on this? If so we will wait until it's passed to change this. You could also go to these deployments and just appends a commit SHA to the clone command.

@AliceGem
Copy link
Contributor

I would not let BSP notebooks to break even after SGA2 review..they could still be used for educational purposes, dissemination etc..If at all, we could make them compatible to the new cerebnest when they also adapt them to the new eBRAINS platform.

@Helveg
Copy link
Contributor Author

Helveg commented Jun 16, 2020

Ok, if they need to function in perpetuity the dependencies need to be frozen, there's no way around that.

@Helveg
Copy link
Contributor Author

Helveg commented Sep 23, 2020

After tons of messing with Travis and NEST I think I've got to an agreeable situation:

  • pip runs the CMake install
  • aborts if the NEST_MODULE_PATH and SLI_PATH aren't properly set (injecting code into .bashrc felt a bit virus-y) and gives a nice error message on how to do it:
    Exception: Please make sure the following env vars contain these directories:
    * NEST_MODULE_PATH: '/home/travis/nest-2.18.0/lib/nest'
    * SLI_PATH: '/home/travis/nest-2.18.0/share/sli'
    You can do so by making sure the following 2 commands are executed on startup (eg. placed in ~/.bashrc):
    export NEST_MODULE_PATH=/home/travis/nest-2.18.0/lib/nest:$NEST_MODULE_PATH
    export SLI_PATH=/home/travis/nest-2.18.0/share/sli:$SLI_PATH

All that's left to do now is to reattach the CMake install instructions to the README

@Helveg
Copy link
Contributor Author

Helveg commented Sep 24, 2020

@alberto-antonietti @AliceGem could you take another look to see if you like the PR now? Could you also test the pip package with pip install cereb-nest and the CMake install with the new instructions? I'm not on Linux atm

@Helveg
Copy link
Contributor Author

Helveg commented Sep 24, 2020

@AliceGem maybe update the information in setup.py? The description etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants